﻿using iS3.DAL;
using iS3.Server.Core;
using iS3.Server.Core.Core;
using iS3.Server.Core.Util;
using iS3.Server.MetaConfig;
using iS3.Server.MetaConfig.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

//元数据模板接口
namespace iS3.Server.ExtensionTemplate.Controller
{
    [RoutePrefix("api/template")]
    public class testController : ApiController
    {

        //获取系统的数据模板目录
        [Route("list/sys")]
        [HttpGet]
        public List<DataModelTemplate> getSysList()
        {
            return DMTManager.getInstance().getSysListSimple();
        }

        //添加元数据到系统仓库
        [Route("add/sys")]
        [HttpPost]
        public bool addDMT2Sys( [FromBody] DataModelTemplate DMT)
        {
            return DMTManager.getInstance().add2Sys(DMT);
        }

    }
}
